/**
 * 
 */

package com.pp.admin.common.client.helper;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;

/**
 * @author pandurang
 */
public class Action extends AdminImage implements ClickHandler {
	
	private ActionHandler	handler;
	
	public Action( ActionHandler handler, String imageURL ) {

		super( imageURL );
		this.handler = handler;
		this.setHeight( Resource.ACTION_IMG_HIGHT );
		this.setWidth( Resource.ACTION_IMG_WIDTH );
		this.addClickHandler( this );
	}
	
	/*
	 * (non-Javadoc)
	 * @see
	 * com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event.dom.client.ClickEvent
	 * )
	 */
	@Override
	public void onClick( ClickEvent event ) {

		handler.action( value );
		
	}
	
}
